//
//  LoginViewController.h
//  NetMobileLocation
//
//  Created by Mehmet Sinan Şahin on 3/7/12.
//  Copyright (c) 2012 netgis. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LoadingBaseViewController.h"

@protocol LoginWindowClose <NSObject>

/*
 *if forStartup is true, loginClose has no effect
 */
-(void) loginClose;

@end

@interface LoginViewController : LoadingBaseViewController <UITextFieldDelegate,UIGestureRecognizerDelegate>{
	IBOutlet UITextField *usernameField;
	IBOutlet UITextField *passwordField;
	IBOutlet UIButton *btnLogin;
	IBOutlet UIButton *btnCancel;
	IBOutlet UIActivityIndicatorView *loginIndicator;
    IBOutlet UILabel *lblSessionGetting;
    
    IBOutlet UIView *viewResult;
    IBOutlet UILabel *lblResult;
    IBOutlet UIImageView *imgResult;
    IBOutlet UILabel *lblUsername;
    IBOutlet UILabel *lblPassword;
    
    IBOutlet UIImageView *imgUsername;
    IBOutlet UIImageView *imgPassword;
    
    BOOL forStartup;
    id<LoginWindowClose> closeCallbackTarget;
}

@property (nonatomic, retain) IBOutlet UITextField *usernameField;
@property (nonatomic, retain) IBOutlet UITextField *passwordField;
@property (nonatomic, retain) IBOutlet UIButton *btnLogin;
@property (nonatomic, retain) IBOutlet UIButton *btnCancel;
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *loginIndicator;
@property (nonatomic, retain) IBOutlet UILabel *lblSessionGetting;
@property (nonatomic, retain) IBOutlet UIView *viewResult;
@property (nonatomic, retain) IBOutlet UILabel *lblResult;
@property (nonatomic, retain) IBOutlet UIImageView *imgResult;
@property (nonatomic, assign) BOOL forStartup;


- (IBAction) login: (id) sender;
/*
 * exits program, or closes view
 */
- (IBAction) cancel: (id) sender;
- (void) setCloseCallbackTarget: (id) target;

-(void) defineGesture;

@end
